<include file="Public/common" />
<block>
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
    <style>
        .col-xs-3{margin-top:5px;}
        th{text-align: center;}
    </style>
</block>
<block name="content">
    <div class="page-header"><h1>首页 &gt;财务管理 >  营业收入报表</h1></div>
    <form action="" >
        <div class="col-xs-12 ">
            <div class="col-xs-3">
                <label for="groupDay" class="col-xs-4">成团时间:</label>
                <div class="col-xs-8 text-left"><input id="groupDay" name="group_start" value="<if condition="$_GET['group_start']">{$_GET['group_start']}</if>"  type="text" readonly class="form-control day" placeholder="成团时间" /></div>
            </div>

            <div class="col-xs-3">
                <div class="col-xs-8 text-left"><input id="tourDay" name="group_end" value="<if condition="$_GET['group_end']">{$_GET['group_end']}</if>" type="text" readonly class="form-control day" placeholder="成团时间" /></div>
            </div>

            <div class="col-xs-3">
                <label for="" class="col-xs-4">团号:</label>
                <div class="col-xs-8 text-left"><input type="text" name="group" value="<if condition="$_GET['group']">{$_GET['group_start']}</if>" class="form-control" placeholder="请输入团号" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">运营商性质:</label>

             </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">下单日期:</label>
                <div class="col-xs-8 text-left"><input id="startDay" type="text" name="group_start" value="<if condition="$_GET['group_start']">{$_GET['group_start']}</if>" readonly class="form-control day" placeholder="结算开始时间" /></div>
            </div>

            <div class="col-xs-3">
                <div class="col-xs-8 text-left"><input id="endDay" type="text" name="group_start" value="<if condition="$_GET['group_start']">{$_GET['group_start']}</if>" readonly class="form-control day" placeholder="结算结束时间" /></div>
            </div>
        </div>

        <div class="col-xs-12"  style="margin:10px;">
            <button class="btn btn-primary">查询</button>
            <button class="btn btn-primary" type="button" id="dropdownMenu1" data-toggle="dropdown">
                筛选
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu " role="menu" aria-labelledby="dropdownMenu1" style="padding:10px;">
                <li><input type="checkbox" class="filtrate" checked value="1" id="filtrate_1"> <label for="filtrate_1">ID</label> </li>
                <li><input type="checkbox" class="filtrate"checked value="2" id="filtrate_2"><label for="filtrate_2">订单信息</label></li>
                <li><input type="checkbox" class="filtrate"checked value="3" id="filtrate_3"><label for="filtrate_3">团队类型</label></li>
                <li><input type="checkbox" class="filtrate"checked value="4" id="filtrate_4"><label for="filtrate_4">结算时间</label></li>
                <li><input type="checkbox" class="filtrate"checked value="5" id="filtrate_5"><label for="filtrate_5">成团时间</label></li>
                <li><input type="checkbox" class="filtrate"checked value="6" id="filtrate_6"><label for="filtrate_6">总人数</label></li>
                <li><input type="checkbox" class="filtrate"checked value="7" id="filtrate_7"><label for="filtrate_7">单价</label></li>
                <li><input type="checkbox" class="filtrate"checked value="8" id="filtrate_8"><label for="filtrate_8">附加产品收入</label></li>
                <li><input type="checkbox" class="filtrate"checked value="9" id="filtrate_9"><label for="filtrate_9">结算总额</label></li>
                <li><input type="checkbox" class="filtrate"checked value="10" id="filtrate_10"><label for="filtrate_10">总收入</label></li>
                <li><input type="checkbox" class="filtrate"checked value="11" id="filtrate_11"><label for="filtrate_11">单个成本</label></li>
                <li><input type="checkbox" class="filtrate"checked value="12" id="filtrate_12"><label for="filtrate_12">总成本</label></li>
                <!-- <li><input type="checkbox" class="filtrate"checked value="13" id="filtrate_13"><label for="filtrate_13">附加产品成本</label></li> -->
                <li><input type="checkbox" class="filtrate"checked value="14" id="filtrate_14"><label for="filtrate_14">毛利</label></li>
                <li><input type="checkbox" class="filtrate"checked value="15" id="filtrate_15"><label for="filtrate_15">毛率利</label></li>
            </ul>
            <button class="btn btn-primary  " style="margin-right: 10px">导出</button>

        </div>

    </form>

    <table class="table table-striped table-bordered table-hover table-condensed text-center">
        <thead>
            <tr>
                <th class="filtrate_1" >ID <!--<input type="checkbox" class="checkAll">--></th>
                <th class="filtrate_2" >订单信息</th>
                <th class="filtrate_3" >团队类型</th>
                <th class="filtrate_4" >结算时间</th>
                <th class="filtrate_5" >成团时间</th>
                <th class="filtrate_6" >总人数（一个团的总人数）</th>
                <th class="filtrate_7" >单价（线路的销售单价）</th>
                <th class="filtrate_8" >附加产品收入</th>
                <th class="filtrate_9" >结算总额</th>
                <th class="filtrate_10" >总收入</th>
                <th class="filtrate_11" >单个成本（一条线路）</th>
                <th class="filtrate_12">总成本</th>
                <!-- <th class="filtrate_13">附加产品成本</th> -->
                <th class="filtrate_14">毛利</th>
                <th class="filtrate_15">毛利率</th>
            </tr>

        </thead>
        <tbody>
            <tr >
                <td class="filtrate_1" >001 </td>
                <td class="filtrate_2">线路名称</td>
                <td class="filtrate_3">团队类型</td>
                <td class="filtrate_4">线路编号</td>
                <td class="filtrate_5">运营商</td>
                <td class="filtrate_6">下单时间</td>
                <td class="filtrate_7">实际收客人数</td>
                <td class="filtrate_8">结算金额(单价)</td>
                <td class="filtrate_9">其他费用</td>
                <td class="filtrate_10">总结算金额</td>
                <td class="filtrate_11">结算时间</td>
                <td class="filtrate_12">操作人</td>
                <!-- <td class="filtrate_13">操作人</td> -->
                <td class="filtrate_14">毛利</td>
                <td class="filtrate_15">毛利率</td>
            </tr>
        <tr>
            <td colspan="15">
                <!--分页样式-->
                <ul class="pagination">
                    {$show}
                </ul>
            </td>
        </tr>
        </tbody>
    </table>

</block>
<block name="js">
<script src=""></script>
<script src="__STATIC__/layui/layui.all.js"></script>
<script src="__STATIC__/layui/layui.js"></script>
<script>


//筛选显示
$('body').on('change','.filtrate',function () {
   var id=$(this).val();
   if($(this).is(':checked')){
        $('.filtrate_'+id).show();
   }else{
       $('.filtrate_'+id).hide();
   }
});


layui.use('laydate', function() {
    var laydate = layui.laydate;
    //常规用法
    laydate.render({
        elem: '#startDay'
    });
    laydate.render({
        elem: '#endDay'
    });
    laydate.render({
        elem: '#tourDay'
    });
    laydate.render({
        elem: '#groupDay'
    });
})

/**
 *订单详情
 * @param orderId
 */

function openDetail(orderId){
    layer.open({
        type: 2,
        offset:20,
        area: ['90%','90%'],
        title: '订单详情',
        content: '{:U("Orders/detail")}',
    })
}
</script>
</block>
